package wsz.service;

import core.anno.Service;
import wsz.pojo.User;

import java.util.HashMap;
import java.util.Map;

/**
 * @author wsz
 * @date 2021/10/28 15:06
 **/
@Service
public class UserService {

    private Map<String, User> userMap = new HashMap<>();

    public UserService() {
        userMap.put("wsz", new User(1, "wsz", "wsz"));
        userMap.put("001", new User(2, "001", "001"));
        userMap.put("002", new User(3, "002", "002"));
    }

    public User getByUserName(String userName) {
        System.out.println("userName="+ userName);
        return userMap.get(userName);
    }
}
